how to make priority queue of pairs in java

120

how to make priority queue of pairs in java -

PriorityQueue<Pair<Integer,Integer> > pq=
                new PriorityQueue<Pair<Integer,Integer>>(n, Comparator.comparing(Pair::getKey));

Comments

Submit
0 Comments